public class UniqueIdentifier extends Object implements XMLMarshallable
This object represents a unique identifier with a type and a value.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="uid">
<xs:complexType>
<xs:attribute name="type" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static String |
TAG_NAME
The XML tag name of this object.
|
| Constructor and Description |
|---|
UniqueIdentifier()
Builds an empty unique identifier object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
String |
getType()
Gets the type of the unique identifier.
|
String |
getValue()
Gets the value of the unique identifier.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setType(String type)
Sets the type of the unique identifier.
|
void |
setValue(String value)
Sets the value of the unique identifier.
|
String |
toString() |
static UniqueIdentifier |
valueOf(String input)
Returns a unique identifier based on its string representation.
|
public static final String TAG_NAME
public UniqueIdentifier()
public String getType()
public void setType(String type)
type - the type of the unique identifierpublic String getValue()
public void setValue(String value)
value - the value of the unique identifierpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic static UniqueIdentifier valueOf(String input)
input - an input string representing the unique identifier and following the format of the toString() method